<script setup lang="ts">

</script>

<template>
  <div class="loading-wrap">
    <div class="dot-wrap"></div>
  </div>
</template>

<style scoped lang="scss">
.loading-wrap {
  //width: 100%;
  //height: 100%;
  //position: fixed;
  //left: 0;
  //top: 0;
  //z-index: 1000;
  width: 200px;
  height: 200px;
  background-color: #fff;
  opacity: 0.5;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.dot-wrap {
  width: 30px;
  height: 20px;
  position: relative;
}

.dot-wrap:before,
.dot-wrap:after {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00bebe;
  position: absolute;
}

.dot-wrap:before {
  transform: translateX(0);
  animation: loading-left 1.2s infinite;
}

.dot-wrap:after {
  background: lighten(#00bebe, 8%);
  transform: translateX(22px);
  animation: loading-right 1.2s infinite;
}

@keyframes loading-left {
  from {
    transform: translateX(0);
  }

  50% {
    transform: translateX(22px);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes loading-right {
  from {
    transform: translateX(22px);
  }

  50% {
    transform: translateX(0);
  }

  to {
    transform: translateX(22px);
  }
}
</style>